<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增物资')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-dept-add">
        <input id="treeId" name="parentId" type="hidden" value="1"/>
        <input id="planId" name="planId" th:value="${planId}" type="hidden"/>
        <input id="stageId" name="stageId" th:value="${stageId}" type="hidden"/>

        <div class="form-group">
            <label class="col-sm-3 control-label ">作业内容：</label>
            <div class="col-sm-8">
                    <input class="form-control" type="text" name="workName" id="workName" required>

            </div>
        </div>



        <div class="form-group">
            <label class="col-sm-3 control-label">完成时间：</label>
            <div class="col-sm-8">
                <input id="createTime" required data-format="yyyy-MM-dd HH:mm:ss" name="createTime"
                       th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="form-control"
                       type="text" th:class="time-input" data-type="datetime">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">描述：</label>
            <div class="col-sm-8">
                <textarea class="form-control" rows="4" type="text" name="workDetail"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="remark" name="remark" rows="4" class="form-control" type="text"></textarea>
            </div>
        </div>


    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "system/meterial";

    $("#form-dept-add").validate({
        onkeyup: false,
        rules: {
            orderNum: {
                digits: true
            },
            email: {
                email: true,
            },
            phone: {
                isPhone: true,
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(ctx + "system/ncWorkLog/addNongShiSave", $('#form-dept-add').serialize(), function () {
                parent.reload();
            });
        }
    }


</script>
</body>
</html>
